using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace QLHXNK.Forms
{
    public partial class NewMainForm : Form
    {
        public NewMainForm()
        {
            this.Show();
            this.Height = 451;
            this.Width = 711;
            this.CenterToScreen();
            this.Text = "Hệ Thống Quản Lý Hàng Xuất Nhập Khẩu";
            FrmDangNhap frmDangNhap = new FrmDangNhap();
            frmDangNhap.ShowDialog();
            InitializeComponent();
            lbNguoiDung.Text = "Xin chào " + FrmDangNhap.userName + " !";
            this.CenterToScreen();
        }

        private void danhMụcHàngToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewFrmDanhMucHangHoa frm = new NewFrmDanhMucHangHoa();
            frm.ShowDialog();
        }

        private void danhMụcChiPhíToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewFrmDanhMucChiPhi frmDanhMucChiPhi = new NewFrmDanhMucChiPhi();
            frmDanhMucChiPhi.ShowDialog();
        }

        private void kinhDoanhToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewFrmNhapHangKinhDoanh frmNhapHangKinhDoanh = new NewFrmNhapHangKinhDoanh();
            frmNhapHangKinhDoanh.ShowDialog();
        }

        private void chiPhíToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewFrmNhapChiPhiHangThang frmNhapChiPhiHangThang = new NewFrmNhapChiPhiHangThang();
            frmNhapChiPhiHangThang.ShowDialog();
        }

        private void thoátToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("Bạn muốn thoát chương trình", "Thoát", MessageBoxButtons.YesNo);
            if (result == System.Windows.Forms.DialogResult.Yes)
            {
                this.Close();
            }
        }

        private void NewMainForm_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyValue == 27)
                this.Close();
        }

        private void lbDangNhap_Click(object sender, EventArgs e)
        {
            Application.Restart();
        }

        private void đổiMậtKhẩuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmDoiMatKhau frmDoiMatKhau = new FrmDoiMatKhau();
            frmDoiMatKhau.ShowDialog();
        }

        private void nhậpHàngToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            FrmBaoCaoNhapHang frmBaoCaoNhapHang = new FrmBaoCaoNhapHang();
            frmBaoCaoNhapHang.ShowDialog();
        }

        private void chiPhíToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            FrmBaoCaoChiPhi frmBaoCaoChiPhi = new FrmBaoCaoChiPhi();
            frmBaoCaoChiPhi.ShowDialog();
        }

        private void dịchVụToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewFrmDichVu frmDichVu = new NewFrmDichVu();
            frmDichVu.ShowDialog();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("Bạn muốn thoát chương trình", "Thoát", MessageBoxButtons.YesNo);
            if (result == System.Windows.Forms.DialogResult.Yes)
            {
                this.Close();
            }
        }

        private void btnChangePass_Click(object sender, EventArgs e)
        {
            FrmDoiMatKhau frmDoiMatKhau = new FrmDoiMatKhau();
            frmDoiMatKhau.ShowDialog();
        }

        private void btnDanhMucHangHoa_Click(object sender, EventArgs e)
        {
            NewFrmDanhMucHangHoa frm = new NewFrmDanhMucHangHoa();
            frm.ShowDialog();
        }

        private void btnNhapChiPhiThang_Click(object sender, EventArgs e)
        {
            NewFrmNhapChiPhiHangThang frmNhapChiPhiHangThang = new NewFrmNhapChiPhiHangThang();
            frmNhapChiPhiHangThang.ShowDialog();
        }

        private void btnDanhMucChiPhi_Click(object sender, EventArgs e)
        {
            NewFrmDanhMucChiPhi frmDanhMucChiPhi = new NewFrmDanhMucChiPhi();
            frmDanhMucChiPhi.ShowDialog();
        }

        private void btnBaoCao_Click(object sender, EventArgs e)
        {
            FrmBaoCao frmBaoCao = new FrmBaoCao();
            frmBaoCao.ShowDialog();
        }

        private void btnNhap_Click(object sender, EventArgs e)
        {
            NewFrmNhapHangKinhDoanh frmNhaphangKinhDoanh = new NewFrmNhapHangKinhDoanh();
            frmNhaphangKinhDoanh.ShowDialog();
        }

        private void btnNhapHangDichVu_Click(object sender, EventArgs e)
        {
            NewFrmDichVu frmDichVu = new NewFrmDichVu();
            frmDichVu.ShowDialog();
        }
    }
}